#{extends 'main.html' /}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="pt-BR">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>

	<h2>Adicionar ponto chave</h2>
	#{form
	@Carteiro.adicionarLocal(),method:'POST',class:'form-horizontal'}
	#{include 'Carteiro/novoLocal.html' /}
	<div class="form-actions">
		<button class="btn btn-primary" type="submit">Adicionar Local</button>
		<button class="btn" type="reset">Desfazer</button>
	</div>
	#{/form}

	<table cellspacing="0">
		<thead>
			<tr>
				<th scope="col" class="header" style="width: 10%;">Id</th>
				<th scope="col" class="header" style="width: 30%;">Descricao</th>
			</tr>
		</thead>
		<tbody>
			#{if vertices.size() > 0} 
			#{list items:vertices, as:'v'}
				<tr>
				<td style="width: 10%;">${v.id}</td>
				<td style="width: 30%;">${v.descricao}</td>
				
				<td style="width: 10%;"><a class="various fancybox.ajax"
					href="@{Desafios.alterar(d.id)}"><input type="image"
						src="@{'/public/images/icn_edit.png'}" title="Edit"></a> <a
					href="@{Desafios.deletar(d.id)}"><input type="image"
						src="@{'/public/images/icn_trash.png'}" title="Trash"></a></td>

			</tr>
			#{/list} #{/if} #{else}
			<tr>
				<td cellspan="4">Nao ha desafios cadastrados.</td>
			</tr>
			#{/else}
		</tbody>
	</table>

	<h2>Adicionar ponto chave</h2>
	#{form
	@Carteiro.adicionarLocal(),method:'POST',class:'form-horizontal'}
	#{include 'Carteiro/novoLocal.html' /}
	<div class="form-actions">
		<button class="btn btn-primary" type="submit">Adicionar Local</button>
		<button class="btn" type="reset">Desfazer</button>
	</div>
	#{/form}
</body>
</html>